﻿// See https://aka.ms/new-console-template for more information
using StackExchange.Redis;

Console.WriteLine("Hello, World!");

using ConnectionMultiplexer redis = ConnectionMultiplexer.Connect("localhost");
IDatabase db = redis.GetDatabase();
ISubscriber sub = redis.GetSubscriber();

sub.Subscribe("messages", (channel, message) =>
{
    Console.WriteLine((string)message);
});

Console.ReadKey();